﻿package {
	import asunit.textui.TestRunner;
	import cpgears.log.ArthropodLogFactory;
	import cpgears.log.LogManager;
	import flash.display.Sprite;
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Whyves
	 */
	public class Main extends Sprite {
		
		public function Main() {
			LogManager.logFactory = new ArthropodLogFactory();
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			var unittests:TestRunner = new TestRunner();			
			stage.addChild(unittests);
			unittests.start(AllTests, null, TestRunner.SHOW_TRACE);
		}
		
	}
	
}